Memory Usage Getter 2.0
Copyright © 2002, Simone Manganelli.
Ellipsis Productions
http://homepage.mac.com/simx/

Memory Usage Getter 2.0 graphically displays the memory usage of each and every process currently running.  It achieves through a simple (haha, right) underlying AppleScript that does calls to the UNIX command line.

AGREEMENT:  If you use this software, you are agreeing not to redistribute it for profit, or to reverse-engineer it and gain access to the underlying code.  You will also not redistribute this application claiming that you are the creator of it.  This software is provided AS IS, with no guarantees expressed or implied.

How to use:

• Launch "Memory Usage Getter".  The memory usage will automatically be displayed when the window opens.
• Click on the three tabs named "Open Applications", "Other User Processes", and "System Processes" to see the memory usage of all of your different processes.  They are separated this way so that processes that are used by the system don't clutter up the list of open applications.
• If there are more than 10 items to display in a tab, the forward button will be activated.  Click it to see the next 10 top memory users.  The back button will also activate when there is a previous set of 10 processes to display.
• For each time you want to see an updated memory usage, simply click the "Refresh" button again.  You can also select "Refresh Memory Usage" from the "File" menu or you can press Command-R.

Version History:

2.0:	• Added custom icon.
	• Dramatically improved the rounding routine, reducing it to a 1-line routine from a 26-liner.  Again, this was a big dumb mistake on my part.  This should speed it up just a tad.  But every little bit helps. :)

2.0b5:	• Fixed the intermittent "Cannot make failure into an integer" bug (I hope).
	• Fixed a bunch of errors on each refresh if you are using a numbering system which uses commas to denote parts of integers.  This was an oversight on my part: I was assuming that everyone was using periods, so when these numbers went to the rounding routine, it choked because it didn't see the expected period.
	• Not released to the public.

2.0b4:	• Main addition: an overall memory usage bar!  The default at startup for this bar is to show total memory usage and the amount of memory free.  However, I implemented a nifty little thing: hover the mouse over the progress bar and you'll see a tooltip.  If you click on the progress bar, it will cycle through display total and free memory usage, wired memory usage, active memory usage, and inactive memory usage!
	• Once again changes "Classic Startup" to "The Classic Environment".  This is also now put into the "Other User Processes" tab.
	• If your iDisk is mounted, it will now display "iDisk: username", and will put it in the "Other User Processes" tab.
	• Memory usage fields are now rounded to two decimal places.  As a result, I could make the window width even smaller (the less real estate taken up, the better!).
	• The labels above the vertical lines are now correctly positioned again.
	• The menu item "Refresh Memory Usage" and the keystroke Command-R now both refresh the memory usage just like the "Refresh" button does.
	• The window is now active on launch, so you don't have to click on it to make things look purty. :)
	• Implemented annoying registration dialogs.  They have a 1 in 10 chance of coming up every time you refresh memory usage.  Just a little encouragement to pay the registration fee -- no hard feelings, eh? :D
	• Not released to the public.

2.0b3:  	• Dramatically improved the GUI.
	• Condensed window (by making the text fields and progress bars smaller) so that the size of the window is even smaller than the window in 2.0b1 but displays the same amount of information.
	• Processes are separated out into 3 new tabs: all processes run by root are dropped in the "System Processes" tab.  There are only 7 possible processes that will be dropped into the "Other User Processes" tab: SystemUIServer, WindowServer, pbs, loginwindow, SecurityAgent, ATSServer, and tr -s ("tr -s" is one of the commands that this program uses to get memory usage).  All other processes are dropped into the "Applications" tab.
	• Again allows viewing of the memory usage of all processes by the use of the forward and back buttons on each tab.  These allow you to cycle through groups of 10 processes on each tab.
	• Information about memory usage is cached in global variables so you will see the memory usage of the time when you last clicked the "Refresh" button (or the time when the application was launched).  I plan to add a time stamp somewhere on the window.
	• Not released to the public.

2.0b2:	• Increased number of applications displayed from 10 to 17.
	• Optimized code.

2.0b1:	• First version using AppleScript Studio that employs a real graphical user interface and displays memory usage graphically.
	• Not released to the public.

1.0.1:	• Initial public release.
	• Adds the ability to type "all" in the first dialog to display the memory usage for all applications.

1.0:	• First version.
	• Not released to the public.

Known Issues:

• Sometimes the name will include something like "-psn_0_1310721" at the end.  This is normal if the application does not have a ".app" extension on it.  I intend to fix this.

• I don't believe there is a way to see the memory usage of Classic applications, as they are running inside the emulator environment, so they are all lumped into the entry "The Classic Environment".  Hopefully you're not running Classic, though. :)

• You have to manually refresh the memory usage.  Hopefully I can get it so that you can set an interval at which it auto-updates.

• In very rare circumstances, the memory statistics may add up to an incorrect total.  This cannot be corrected, but it should not happen often.

• No help yet (although that'll be easy to whip up).

• Memory usage refreshing is still a little sluggish.  Not sure if I can fix this.

• After you press the Refresh button, you'll notice that when you first switch to the other two tabs, the program will pause for a few seconds before displaying the information.  This is because I had to implement a workaround to an AppleScript Studio bug where it doesn't allow you to manipulate the contents of progress bars that are not in the current tab view item.  So it caches the information in global variables, and then when you switch to the tab, THEN it displays the information.  All I can do right now is 1) hope that Apple fixes this bug and then go back to setting the contents of all the progress bars in all tabs or 2) hope that this refreshing will get faster. 

• In order to make memory refreshing faster, I had to make the text fields and the progress bars disappear, then update them, and then make them visible again.  Sometimes the text fields and progress bars don't all become visible at once, also.

• The progress bars "move".  This can be easily fixed, but whenever you switch tabs they became active again.  I think I might be able to fix this, but I kind of like the effect. :)

• If you like to mess around with programs, you can get a bunch of errors if you click on all the enabled buttons rapidly.  This is because it takes 1-2 seconds to process each function, but since the buttons are still enabled, it accepts each click and then it tries to do two things at once, which it can't.  I'll try and prevent this, but don't send me bugs about this. :P

Registering Memory Usage Getter:

Memory Usage Getter is not free.  If, after 30 days, you decide to keep using this program, you must pay the $5 registration fee.  Come on, it's $5, and it helps support a poor college student. :)  You can register via PayPal, or you can contact me to find out other means of paying.  To register via PayPal, go to this URL and follow the instructions to pay for Memory Usage Getter:

http://homepage.mac.com/simx/

If you wish to contact me about other methods, my e-mail address is simX@mac.com .

After you register Memory Usage Getter, I will contact you directly.  Your personalized copy of Memory Usage Getter will be posted on the internet with a random password, and you will be sent the URL to download it as well as the password to access the archive; you will have a week to download them before they will be taken down and you must contact me to put it up again.  Until I find a better way of doing registration, this is going to be the method; I might be able to implement registration codes in the future, in which case you will be contacted when the new version comes out with a registration code.

Memory Usage Getter © 2002, Simone Manganelli.
Ellipsis Productions.
Send bugs, comments, feature requests, etc. to simX@mac.com.